<template>
  <el-container direction="vertical">
    <Header />
    <el-container class="main">
      <SideMenu />
      <el-main>
        <el-page-header
          class="section"
          @back="goBack"
          :content="currentPageTitle"
        >
        </el-page-header>
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>
<style lang="less" scoped>
.main {
  height: calc(100vh - 61px);
}
.el-header {
  background-color: #b3c0d1;
  color: #333;
  line-height: 60px;
}
.el-aside {
  background-color: #fff;
}
</style>
<script>
import Header from '../components/header.vue'
import SideMenu from '../components/sideMenu.vue'
export default {
  data: () => {
    return {}
  },
  computed: {
    currentPageTitle() {
      return this.$store.state.currentPageTitle
    },
  },
  components: {
    Header,
    SideMenu,
  },
  methods: {
    goBack() {
      this.$router.go(-1)
    },
  },
}
</script>
